﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using WpfGraphing.Collections;

namespace WpfGraphingTest
{
    public class BarChartViewModel : WpfGraphing.AbstractViewModel<BarChartViewModel>
    {

        ChartBasicDetailsViewModel chartDetails;
        public ChartBasicDetailsViewModel ChartDetails
        {
            get { return chartDetails; }
            set
            {
                chartDetails = value;
                OnPropertyChanged("ChartDetails");
            }
        }

        public BarChartViewModel()
        {
            this.chartDetails = new ChartBasicDetailsViewModel();
            this.ChartDetails.Title = "This is a Title";
            this.ChartDetails.XAxisTitle = "XAxis";
            this.ChartDetails.YAxisTitle = "YAxis";
            this.ChartDetails.BarSeries.LabelMinimumFontSize = 2;
            this.ChartDetails.Setup("Tittle", "XaXis", "YAxis", WpfGraphing.Collections.BarChartDataList.ChartBarType.VerticalStack, WpfGraphing.Style.ChartStyle.ChartGridLinePattern.Dash, true,true);


            BarDataSeries timeStudiesBar = new BarDataSeries(this.ChartDetails.ChartStyle) { SeriesName = "Series Twosss", FillColor = Brushes.Gray  };
            BarDataSeries liasonBar = new BarDataSeries(this.ChartDetails.ChartStyle) { SeriesName = "Series One", FillColor = Brushes.Green };
            BarDataSeries liasonBarq = new BarDataSeries(this.ChartDetails.ChartStyle) { SeriesName = "Series ss", FillColor = Brushes.Yellow};
            BarDataSeries liasonBarq1 = new BarDataSeries(this.ChartDetails.ChartStyle) { SeriesName = "Series sdds", FillColor = Brushes.Brown};
            BarDataSeries liasonBarq2= new BarDataSeries(this.ChartDetails.ChartStyle) { SeriesName = "Series sfdss", FillColor = Brushes.Orange};
            BarDataSeries liasonBarq3 = new BarDataSeries(this.ChartDetails.ChartStyle) { SeriesName = "Series ssasdd", FillColor = Brushes.Red};


            liasonBar.AddBar("Brenda Botond", 10);
            timeStudiesBar.AddBar("Brenda Botond", 11);
            liasonBarq.AddBar("Brenda Botond", 12);
//            liasonBarq1.AddBar("Brenda Botond", 12);
//            liasonBarq2.AddBar("Brenda Botond", 12);
//            liasonBarq3.AddBar("Brenda Botond", 12);
            
            
               liasonBar.AddBar("chris Botond", 30);
           timeStudiesBar.AddBar("chris Botond", 40);
            liasonBarq.AddBar("chris Botond", 50);

            liasonBar.AddBar("Botond", 30);
            timeStudiesBar.AddBar("Botond", 30);
            liasonBarq.AddBar("Botond", 30);

            this.chartDetails.AddDataListItem(liasonBar);
            this.chartDetails.AddDataListItem(timeStudiesBar);
            this.chartDetails.AddDataListItem(liasonBarq);
 //           this.chartDetails.AddDataListItem(liasonBarq1);
 //           this.chartDetails.AddDataListItem(liasonBarq2);
 //           this.chartDetails.AddDataListItem(liasonBarq3);
            
            this.ChartDetails.CreateGraph();
        }
    }
}
